package com.ule.merchant.order.mon.service.listener;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;


@Component
public class ApplicationInitListener implements org.springframework.context.ApplicationListener<ContextRefreshedEvent> {

    @Autowired
    private List<ApplicationInitBean> initBeanList;

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {

        for (ApplicationInitBean bean : initBeanList) {
            bean.init();
        }
    }

}
